package com.erlang.spirngbootmybatis.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;

/**
 * 人实体.
 * 测试swagger
 *
 * @author ZGQ
 */
@ApiModel(description = "用户详细信息")
public class Person {

    @ApiModelProperty(value = "用户Id", position = 1)
    @NotNull
    private Long id;

    @ApiModelProperty(value = "用户年龄", position = 2)
    private int age;

    @ApiModelProperty(value = "用户姓名", position = 3)
    private String name;

    @ApiModelProperty(value = "用户所在城市", position = 4)
    @Email
    private String city;



    public Person(Long id,int age,String name,String city){
        this.id=id;
        this.age=age;
        this.city=city;
        this.name=name;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }
}